/**
 * Created by Handsome.Ho on 2015/10/15.
 */
angular.module('task.controllers', []).controller('taskCtrl', function ($scope, TaskService) {
  $scope.showMenu = false;
  $scope.todo = 0;
  TaskService.countTodo({
    callback: function (c) {
      $scope.todo = c;
    }
  });
  $scope.showHandle = function () {
    $scope.showMenu = !$scope.showMenu;
  }
  $scope.showTodo = function () {
    $scope.showMenu = false;
    $scope.title1 = '待办事项';
    TaskService.listTodo({callback:function(data){
      $scope.data1 = data;
    }});
    $scope.title2 = '已办事项';
  }
});
